package ru.fivestarter.entities.diary;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.*;

import ru.fivestarter.entities.leonardo.UsersLeo;

/**
 * Entity implementation class for Entity: GoalOfYear
 *
 */
@Entity
@Table(name="Goals", schema="diary")
@NamedQuery(name="Goals.findByDateUser",
			query="SELECT g FROM Goals g WHERE g.dataDiary=:dataD AND g.user=:userD")
public class Goals implements Serializable {	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="KEY_DIARY")
	private Integer keyDiary;
	@Column(unique=false, nullable=false, name="data_diary")
	@Temporal(TemporalType.DATE)
	private Calendar dataDiary;	
	@Lob
	private String goalDay;
	@Lob
	private String frog;
	@Lob
	private String beefsteak;
	@Lob
	private String fixTask;
	@Lob
	private String toughTask;
	@Lob
	private String eventDay;
	@Lob
	private String award;
	@ManyToOne
	@JoinColumn(name="login", nullable=false)
	private UsersLeo user;

	public Goals() {
		super();
	}
	
	public Integer getKeyDiary() {
		return keyDiary;
	}

	public void setKeyDiary(Integer keyDiary) {
		this.keyDiary = keyDiary;
	}

	public Calendar getDataDiary() {
		return dataDiary;
	}

	public void setDataDiary(Calendar dataDiary) {
		this.dataDiary = dataDiary;
	}

	public String getGoalDay() {
		return goalDay;
	}

	public void setGoalDay(String goalDay) {
		this.goalDay = goalDay;
	}

	public String getFrog() {
		return frog;
	}

	public void setFrog(String frog) {
		this.frog = frog;
	}

	public String getBeefsteak() {
		return beefsteak;
	}

	public void setBeefsteak(String beefsteak) {
		this.beefsteak = beefsteak;
	}

	public String getFixTask() {
		return fixTask;
	}

	public void setFixTask(String fixTask) {
		this.fixTask = fixTask;
	}

	public String getToughTask() {
		return toughTask;
	}

	public void setToughTask(String toughTask) {
		this.toughTask = toughTask;
	}

	public String getEventDay() {
		return eventDay;
	}

	public void setEventDay(String eventDay) {
		this.eventDay = eventDay;
	}

	public String getAward() {
		return award;
	}

	public void setAward(String award) {
		this.award = award;
	}

	public UsersLeo getUser() {
		return user;
	}

	public void setUser(UsersLeo user) {
		this.user = user;
	}
	
    
}
